<?php

/**
 * LEAGUEMan
 * 
 * Copyright (C) 2007 Marko Bischof
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

?>

<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		
		if (form.name.value == ""){
			alert( 'Must have a name');
		}
		else {
			submitform( pressbutton );
		}
	}
</script>

<table cellpadding="4" cellspacing="0" border="0" width="100%">
	<tr>
		<td width="100%">
			<span class="sectionname">
				<?php echo $this->project->project_name;?> - <?php echo $this->t->team_name;?>
			</span>
		</td>
	</tr>
</table>

<form action="index2.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">

<?php
	$ptabs = new mosTabs( 0 );
	$ptabs->startPane( "com_leagueman" );
	$ptabs->startTab("General","General-page");
?>
	<table class="adminform">
		<tr>
			<td width="20%" align="right"><b><?php echo 'Responsible:';?></b></td>
			<td width="80%"><?php echo mosHTML::selectList($this->users, 'teamtool_user', 'class="text_area" size="1"', 'value', 'text', $this->row->teammap_user);?></td>
		</tr>
		<tr>
			<td width="20%" align="right"><b><?php echo 'Start Points:';?></b></td>
			<td width="80%">
				<input type="text" name="teammap_points" size="5" maxlength="15" class="text_area" value="<?php echo $this->row->teammap_points;?>" />
			</td>
		</tr>
		<tr>
			<td width="20%" align="right"><b><?php echo 'Info:';?></b></td>
			<td width="80%">
				<input type="text" name="teammap_info" size="50" maxlength="250" class="text_area" value="<?php echo $this->row->teammap_info;?>" />
			</td>
		</tr>
		<tr>
			<td width="20%" align="right"><b><?php echo 'Logo';?>:</b></td>
			<td width="80%">
				<input type="file" name="upload" size="40" class="text_area" />
			</td>
		</tr>
		<tr>
			<td width="20%" align="right">&nbsp;</td>
			<td width="80%">
				<?php $this->plugin("thumb", "teams", $this->row->teammap_image, 400, 300);?>
			</td>
		</tr>
	</table>
<?php
	$ptabs->endTab();
	$ptabs->startTab("Description","Description-page");
?>
	<table class="adminform">
		<tr>
			<td width="80%">
				<textarea name="teammap_text" rows="15" cols="100" class="teaxt_area"><?php echo $this->row->teammap_text;?></textarea>
			</td>
		</tr>
	</table>
<?php
	$ptabs->endTab();
	$ptabs->endPane();
?>
	
	<input type="hidden" name="teammap_id" value="<?php echo $this->row->teammap_id; ?>" />
	<input type="hidden" name="teammap_project" value="<?php echo $this->project->getID();?>" />
	<input type="hidden" name="teammap_team" value="<?php echo $this->t->team_id;?>" />
	<input type="hidden" name="option" value="com_leagueman" />
	<input type="hidden" name="act" value="teammap" />
	<input type="hidden" name="task" value="" />
</form>